﻿

using System;

namespace Yoze.Common.Messaging
{
    /// <summary>
    /// 消息发布者, 可以将消息发送到消息队列
    /// </summary>
    /// <seealso cref="System.IDisposable" />
    public interface IMessagePublisher : IDisposable
    {
        /// <summary>
        /// 将指定的消息发布到消息队列。
        /// </summary>
        /// <typeparam name="TMessage">The type of the message to be published.</typeparam>
        /// <param name="message">The message to be published.</param>
        void Publish<TMessage>(TMessage message);
    }
}
